#include <cstdio>
#include <algorithm>
#include <cstring>

using namespace std;

struct Node
{
    char s[ 55 ];
};

bool operator < ( const Node &a, const Node &b )
{
    return strcmp( a.s, b.s ) < 0;
}

Node a[ 10001 ];

int main( )
{
    int n, ans, i, j, len, maxl;
    while ( scanf("%d", &n) != EOF )
    {
        maxl = 0;
        for ( i = 0; i < n; i++ )
        {
            scanf("%s", a[ i ].s);
            if ( maxl < strlen( a[ i ].s ) )
                maxl = strlen( a[ i ].s );
        }
        sort( a, a + n );
        ans = strlen( a[ 0 ].s );
        for ( i = 1; i < n; i++ )
        {
            len = strlen( a[ i ].s );
            for ( j = 0; j < len; j++ )
                if ( a[ i - 1 ].s[ j ] != a[ i ].s[ j ] )
                    break;
            ans += len - j;
        }
        ans = ans * 2 + n - maxl;
        printf("%d\n", ans);
    }
    return 0;
}
